home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Codigo / Texto y fuentes / AllAboutFont / AllAboutFont.cs next >
Encoding:
Text File  |  2002-05-02  |  1.8 KB  |  40 lines

  1. //-------------------------------------------
  2. // AllAboutFont.cs ⌐ 2001 by Charles Petzold
  3. //-------------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7.  
  8. class AllAboutFont: PrintableForm
  9. {
  10.      public new static void Main()
  11.      {
  12.           Application.Run(new AllAboutFont());
  13.      }
  14.      public AllAboutFont()
  15.      {
  16.           Text = "Todo sobre fuentes";
  17.      }
  18.      protected override void DoPage(Graphics grfx, Color clr, int cx, int cy)
  19.      {
  20.           grfx.DrawString(
  21.                     "Name: "               + Font.Name            + "\n" +
  22.                     "FontFamily: "         + Font.FontFamily      + "\n" +
  23.                     "FontStyle: "          + Font.Style           + "\n" +
  24.                     "Bold: "               + Font.Bold            + "\n" +
  25.                     "Italic: "             + Font.Italic          + "\n" +
  26.                     "Underline: "          + Font.Underline       + "\n" +
  27.                     "Strikeout: "          + Font.Strikeout       + "\n" +
  28.                     "Size: "               + Font.Size            + "\n" +
  29.                     "GraphicsUnit: "       + Font.Unit            + "\n" +
  30.                     "SizeInPoints: "       + Font.SizeInPoints    + "\n" +
  31.                     "Height: "             + Font.Height          + "\n" +
  32.                     "GdiCharSet: "         + Font.GdiCharSet      + "\n" +
  33.                     "GdiVerticalFont : "   + Font.GdiVerticalFont + "\n" +
  34.                     "GetHeight(): "        + Font.GetHeight()     + "\n" +
  35.                     "GetHeight(grfx): "    + Font.GetHeight(grfx) + "\n" +
  36.                     "GetHeight(100 DPI): " + Font.GetHeight(100),
  37.                     Font, new SolidBrush(clr), Point.Empty);
  38.      }
  39. }
  40.